package com.laosg.framework.fhir.springboot.service.impl;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.server.RestfulServer;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;

/**
 * Created by kaimin on 3/7/2019.
 * time : 23:27
 */
@WebServlet("/")
public class TestRestFulServer extends RestfulServer {

    @Override
    protected void initialize() throws ServletException {
        //按照版本 创建上下文
        setFhirContext(FhirContext.forDstu2());
        //注册资源提供
        registerProviders(new TestResourceProvider());
    }
}
